home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
x68000.arc
/
SOURCE.ARC
/
PARSER.DEF
< prev
next >
Wrap
Text File
|
1986-01-22
|
858b
|
36 lines
DEFINITION MODULE Parser;
(* Reads the Source file, and splits each *)
(* line into Label, OpCode & Operand(s). *)
FROM FileSystem IMPORT
File;
EXPORT QUALIFIED
TOKEN, OPERAND, STRING,
Line, LineCount, OpLoc, SrcLoc, DestLoc, LineParts;
CONST
TokenSize = 8;
OperandSize = 20;
TYPE
TOKEN = ARRAY [0..TokenSize] OF CHAR;
OPERAND = ARRAY [0..OperandSize] OF CHAR;
STRING = ARRAY [0..80] OF CHAR;
VAR
OpLoc, SrcLoc, DestLoc : CARDINAL;
Line : STRING;
LineCount : CARDINAL;
PROCEDURE LineParts (VAR f : File; VAR EndFile : BOOLEAN;
VAR Label, OpCode : TOKEN;
VAR SrcOp, DestOp : OPERAND);
(* Reads Line, breaks into tokens, on-passes to symbol & code generators *)
END Parser.